Maybe Array Index is Out of Range (MAIOR)

Description:

MAIOR detects if a value of the index expression is out of the array's boundary. This message is produced when either the index expression is negative or if its maximum value is greater than the maximum value of the accessed array length. It does not produce this message when the minimum value of the index is less than -127 or when the difference between the maximum value of the index and array length is greater than or equal to 127.

Incorrect:

type
  ints = array of integer;
...
function testCase1(i:integer):integer
var integers:ints;
begin
  SetLength(integers,10);
  if (i > 0) and (i <= 10) then
     result := integers[i]
  else result := 1;
end;